package cn.newgrand.netcall.ui.questionRecord;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import org.jivesoftware.spark.util.ResourceUtils;

public class QuestionBaseInfoPanel extends JPanel{
	
	private static final long serialVersionUID = 1L;
	private JTextField askerNameField;
	private JTextField trueNameField;
	private JTextField companyField;
	private JTextField departmentField;
	private JTextField facsimileField;
	private JTextField emailField;
	private JTextField telephoneField;
	private JTextField homePhoneField;
	private JTextArea  remarkArea;
	
	public QuestionBaseInfoPanel(){
		setLayout(new GridBagLayout());
		
		JLabel askerNameLabel = new JLabel();
		askerNameField = new JTextField(4);
		ResourceUtils.resLabel(askerNameLabel, askerNameField, "咨询者:");
		add(askerNameLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
        add(askerNameField, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
        
        JLabel trueNameLabel = new JLabel();
        trueNameField = new JTextField(4);
        ResourceUtils.resLabel(trueNameLabel, trueNameField, "姓名:");
		add(trueNameLabel, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
        add(trueNameField, new GridBagConstraints(3, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
        
        JLabel companyLabel = new JLabel();
        companyField = new JTextField(4);
        ResourceUtils.resLabel(companyLabel, companyField, "公司:");
		add(companyLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
        add(companyField, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
        
        JLabel departmentLabel = new JLabel();
        departmentField = new JTextField(4);
        ResourceUtils.resLabel(departmentLabel, departmentField, "部门:");
		add(departmentLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
        add(departmentField, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
        
        JLabel homePhoneLabel = new JLabel();
        homePhoneField =  new JTextField(4);
        ResourceUtils.resLabel(homePhoneLabel, homePhoneField, "套件:");
		add(homePhoneLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
        add(homePhoneField, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
        
        JLabel telephoneLabel = new JLabel();
        telephoneField = new JTextField(4);
        ResourceUtils.resLabel(telephoneLabel, telephoneField, "手机:");
		add(telephoneLabel, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
        add(telephoneField, new GridBagConstraints(3, 2, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
        

        JLabel facsimileLabel = new JLabel();
        facsimileField =new JTextField(4);
        ResourceUtils.resLabel(facsimileLabel, facsimileField, "传真:");
		add(facsimileLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
        add(facsimileField, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
        
        JLabel emailLabel = new JLabel();
        emailField = new JTextField(4);
        ResourceUtils.resLabel(emailLabel, emailField, "邮箱:");
		add(emailLabel, new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
        add(emailField, new GridBagConstraints(3, 3, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
        
        JLabel remarkLabel = new JLabel();
        remarkArea = new JTextArea(10,5);
        JScrollPane remarkScrollPane = new JScrollPane(remarkArea);
        ResourceUtils.resLabel(remarkLabel, "备注:");
		add(remarkLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
        add(remarkScrollPane, new GridBagConstraints(0, 5, 4, 5, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
		
	}

	public JTextField getAskerNameField() {
		return askerNameField;
	}

	public void setAskerNameField(JTextField askerNameField) {
		this.askerNameField = askerNameField;
	}

	public JTextField getTrueNameField() {
		return trueNameField;
	}

	public void setTrueNameField(JTextField trueNameField) {
		this.trueNameField = trueNameField;
	}

	public JTextField getCompanyField() {
		return companyField;
	}

	public void setCompanyField(JTextField companyField) {
		this.companyField = companyField;
	}

	public JTextField getDepartmentField() {
		return departmentField;
	}

	public void setDepartmentField(JTextField departmentField) {
		this.departmentField = departmentField;
	}

	public JTextField getFacsimileField() {
		return facsimileField;
	}

	public void setFacsimileField(JTextField facsimileField) {
		this.facsimileField = facsimileField;
	}

	public JTextField getEmailField() {
		return emailField;
	}

	public void setEmailField(JTextField emailField) {
		this.emailField = emailField;
	}

	public JTextField getTelephoneField() {
		return telephoneField;
	}

	public void setTelephoneField(JTextField telephoneField) {
		this.telephoneField = telephoneField;
	}

	public JTextField getHomePhoneField() {
		return homePhoneField;
	}

	public void setHomePhoneField(JTextField homePhoneField) {
		this.homePhoneField = homePhoneField;
	}

	public JTextArea getRemarkArea() {
		return remarkArea;
	}

	public void setRemarkArea(JTextArea remarkArea) {
		this.remarkArea = remarkArea;
	}
	

}
